package vip.xiaonuo.supplier.modular.finance.account.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
import vip.xiaonuo.supplier.modular.base.stores.entity.SupplierStores;
import vip.xiaonuo.supplier.modular.finance.accounttype.entity.SupplierAccountType;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 结算账户实体
 *
 * @author Mr.wu
 * @date  2025/03/17 17:17
 **/
@Getter
@Setter
@TableName("SUPPLIER_ACCOUNT")
public class SupplierAccount extends CommonEntity {

    /** 账户ID */
    @TableId
    @Schema(description = "账户ID")
    private String id;

    /** 账户名称 */
    @Schema(description = "账户名称")
    private String accountName;

    /** 账号 */
    @Schema(description = "账号")
    private String accountCode;

    /** 开户行 */
    @Schema(description = "开户行")
    private String accountBank;

    /** 开户人 */
    @Schema(description = "开户人")
    private String accountHolder;

    /** 账户状态 */
    @Schema(description = "账户状态")
    @Trans(type = TransType.DICTIONARY, key = "COMMON_STATUS")
    private String accountStatus;

    /** 所属门店 */
    @Schema(description = "所属门店")
    @Trans(type = TransType.SIMPLE, target = SupplierStores.class, fields = "storeName", alias = "stores", ref = "accountStoreName")
    private String accountStore;

     /**所属门店名称 */
    @Schema(description = "所属门店名称")
    @TableField(exist = false)
    private String accountStoreName;

    /** 账户类型 */
    @Schema(description = "账户类型")
    @Trans(type = TransType.SIMPLE, target = SupplierAccountType.class, fields = "accountType", alias = "accountType", ref = "accountAccountTypeName")
    private String accountAccountType;

     /**账户类型名称 */
    @Schema(description = "账户类型名称")
    @TableField(exist = false)
    private String accountAccountTypeName;

    /** 账户余额 */
    @Schema(description = "账户余额")
    private BigDecimal accountBalance;

    /** 备注 */
    @Schema(description = "备注")
    private String accountRemark;

    /** 排序码 */
    @Schema(description = "排序码")
    private Integer sortCode;

    /** 扩展信息 */
    @Schema(description = "扩展信息")
    private String extJson;

    /** 数据归属 */
    @Schema(description = "数据归属")
    private String companyId;
}
